package com.akl.ssmspringboot.thread;

/**
 * @ClassName: MainClass
 * @Description TODO
 * @Author guoxy
 * @Date 2019/4/19 0019
 * @Version 1.0
 */
public class MainClass {
    /**
     * 两个人AB通过一个账户A在柜台取钱和B在ATM机取钱
     */
    public static void main(String[] args) {
        // 实力化一个银行对象
        Bank bank = new Bank();

        // 实例化两个人，传入同一个银行的对象
        Man man = new Man();
        Women women = new Women();

        Thread t1 = new Thread(man);
        Thread t2 = new Thread(women);

        t1.start();
        t2.start();

    }

}